package com.fqgj.xjd.user.client;

import com.fqgj.common.api.Response;
import com.fqgj.common.api.ResponseData;
import com.fqgj.xjd.user.client.enums.UserRewardEnum;
import com.fqgj.xjd.user.client.request.UserLevelActionRequest;
import com.fqgj.xjd.user.client.request.UserLevelRequest;
import com.fqgj.xjd.user.client.response.UserLevelActionFlow;
import com.fqgj.xjd.user.client.response.UserLevelActionList;
import com.fqgj.xjd.user.client.response.UserLevelInfo;
import com.fqgj.xjd.user.client.response.UserLevelRewardConfig;

import java.util.Date;
import java.util.List;

/**
 * @program: cashmama-user
 * @description 用户等级、权益服务
 * @author: frank
 * @create: 2020-04-14 11:51
 **/
public interface UserLevelService {

    /**
     * 更新用户等级/权益
     * @param request
     * @return
     */
    Response<Boolean> updateUserLevelInfo(UserLevelRequest request);

    /**
     * 获取用户等级/权益信息
     * @param userCode
     * @return
     */
    Response<UserLevelInfo> getUserLevelInfo(String userCode);

    /**
     * 获取用户权益配置信息
     * @return
     */
    Response<List<UserLevelRewardConfig>> queryUserLevelRewardConfig();

    /**
     * 获取用户等级/权益流水
     * @param userCode
     * @param type
     * @see UserRewardEnum
     * @return
     */
    Response<List<UserLevelActionFlow>> queryUserLevelActionList(String userCode, Integer type);

    /**
     * 根据类型查询用户权益记录列表
     * @param userLevelActionRequest
     * @return
     */
    Response<UserLevelActionList> queryUserLevelActionListByPage(UserLevelActionRequest userLevelActionRequest);

    /**
     * 获取用户等级/权益流水（一个自然周）
     * @param userCode
     * @param type
     * @return
     */
    Response<List<UserLevelActionFlow>> queryUserLevelActionListByOneWeek(String userCode, Integer type);

    /**
     * 根据时间获取用户等级/权益流水
     * @param userCode
     * @param type
     * @param date
     * @return
     */
    Response<List<UserLevelActionFlow>> queryUserLevelActionByUserCodeAndDate(String userCode, Integer type, Date date);
}
